Camera Identification Method, Authentication Method, System, and Terminal

ABSTRACT

A camera identification method comprises identifying a to-be-identified camera using a light sensitivity deviation of each pixel in the to-be-identified camera; generating corresponding identification data; identifying a target camera using a light sensitivity deviation of each pixel in the target camera; and identifying the target camera by comparing a similarity between data that identifies the target camera and identification data of a known camera.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of International PatentApplication No. PCT/CN2020/129076, filed on Nov. 16, 2020, thedisclosure of which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure mainly relates to the field of image dataprocessing technologies, and in particular, to a camera identificationmethod, an authentication method, a system, and a terminal.

BACKGROUND

As people require simplified operations on various terminals such asvehicles, more terminals use automatic control to liberate people fromoperations. To replace human operations, a camera for replacing a humaneye and a control system for replacing a human brain need to beinstalled on a terminal, so that a combination of the camera and thecontrol system can be used to make a decision and perform control inplace of people. When the camera is used, authentication needs to beperformed to ensure legality of the camera and avoid a security riskcaused by a malicious camera replacement or the like to operations ofthe control system.

Usually, the camera may be authenticated based on a digital certificateand a digital signature, or the camera is authenticated based on asymmetric key. In an authentication mode based on a digital certificateand a digital signature, a root certificate needs to be generated forthe control system; then a digital certificate of the camera is issuedbased on the root certificate; and then the root certificate is saved tothe control system, and the digital certificate and a private key of thecamera are saved to the camera. The control system authenticates thecamera separately by using the digital certificate of the camera and adigital signature that is generated by the camera based on a randomnumber sent by the control system. In an authentication mode based on asymmetric key, the camera and the control system need to store a key inadvance; the control system sends a random number to the camera; thenthe control system and the camera encrypt the random number respectivelyby using the key; and then the control system authenticates the cameraby comparing an encrypted ciphertext of the camera with that of thecontrol system.

Whichever authentication mode is used, cooperation between the cameraand the control system is required. In particular, the camera needs tobe pre-programmed, and the key needs to be stored in the camera, to meeta subsequent signature requirement, an encryption requirement, and thelike. However, most cameras are purchased from a third party, and it isdifficult to perform pre-programming. Therefore, the key is prone toleakage during distribution. In addition, because the camera does nothave a key storage function, the key is subject to leakage more easily.Therefore, security of a camera authentication process is reduced.

SUMMARY

This application provides a camera identification method, anauthentication method, a system, and a terminal, to identify andauthenticate a camera by using a physical characteristic of the camera,without requiring an additional identifier and authentication data foridentifying and authenticating the camera, thereby effectively improvingsecurity of a camera authentication process.

According to a first aspect, this application provides a cameraidentification method, applied to a camera authentication system, wherethe method includes extracting a first target image from a video streamsent by a to-be-identified camera; obtaining a plurality of pixel blocksfrom the first target image, where the pixel block includes one firstpixel and a plurality of second pixels; establishing, based on aperceived light intensity value of the first pixel and perceived lightintensity values of the plurality of second pixels in each pixel block,a linear relationship model corresponding to the to-be-identifiedcamera, where the perceived light intensity value is a light intensityvalue corresponding to the video stream; substituting perceived lightintensity values of a plurality of second pixels in a plurality oftarget pixel blocks into the linear relationship model, to obtainpredicted light intensity values of first pixels in the target pixelblocks, where the plurality of target pixel blocks are obtained from animage shot by the to-be-identified camera; and calculating differencesbetween the predicted light intensity values and perceived lightintensity values of the first pixels in the plurality of target pixelblocks, to obtain light sensitivity deviations of the first pixels inthe plurality of target pixel blocks and use the light sensitivitydeviations as identification data of the to-be-identified camera.

In this way, the corresponding identification data, that is, lightsensitivity deviations of a plurality of first pixels in the firsttarget image, can be generated for the to-be-identified camera. Theidentification data is a physical characteristic corresponding to theto-be-identified camera. As long as the to-be-identified camera remainsunchanged, the identification data will not be lost or changed.Therefore, a stable reference basis can be provided for authenticating atarget camera.

In an implementation, the establishing, based on a perceived lightintensity value of each pixel and perceived light intensity values ofthe plurality of second pixels, a linear relationship modelcorresponding to the to-be-identified camera includes, by using theperceived light intensity values of the plurality of second pixels ineach pixel block as an input value of an initial linear relationshipmodel and using the perceived light intensity value of the first pixelin each pixel block as an output value of the initial linearrelationship model, training each constant in the initial linearrelationship model, to obtain the linear relationship model.

In this way, the linear relationship model is obtained by continuouslytraining a linear relationship, so that each constant in the linearrelationship model is optimized. This makes the predicted lightintensity value of the first pixel calculated by using the linearrelationship model closer to the perceived light intensity value of thefirst pixel, thereby improving accuracy of identifying the targetcamera.

In an implementation, the linear relationship model complies with thefollowing formula:

$x_{a,b} = {{\underset{{({j,k})} \neq {({a,b})}}{\sum\limits_{{1 \leq j},{k \leq n}}}{c_{j,k}x_{j,k}}} + p}$

x_(a,b) represents a predicted light intensity value of the first pixelin the pixel block, the first pixel is located in a row a and a column bin the pixel block, c_(j,k) represents a first constant, x_(j,k)represents a perceived light intensity value of a pixel in a row j and acolumn k in the pixel block, and p represents a second constant.

In an implementation, the identification data is a first vector or thelight sensitivity deviations of the first pixels in the plurality oftarget pixel blocks, where the first vector includes light sensitivitydeviations corresponding to target first pixels, and the target firstpixels are first pixels corresponding to a preset quantity of highestlight sensitivity deviations among the light sensitivity deviationscorresponding to the first pixels in the plurality of target pixelblocks.

Further, the first pixels in the plurality of target pixel blocks are ina one-to-one correspondence with available pixels in the first targetimage, and the available pixels are pixels in the first target imageother than a second pixel located at an image boundary.

This application provides a plurality of types of identification data,to meet requirements for identifying different to-be-identified cameras.

According to a second aspect, this application provides a cameraauthentication method, applied to a camera authentication system, wherea target camera corresponds to the foregoing to-be-identified camera,and the method includes extracting a second target image from a videostream sent by the target camera; obtaining a plurality of pixel blocksfrom the second target image, where each of the plurality of pixelblocks includes one first pixel and a plurality of second pixels;substituting perceived light intensity values of the plurality of secondpixels in the plurality of pixel blocks into a linear relationshipmodel, to obtain a predicted light intensity value of the first pixel ineach of the plurality of pixel blocks; calculating a difference betweenthe predicted light intensity value and a perceived light intensityvalue of each first pixel, to obtain a light sensitivity deviation ofeach first pixel; and authenticating the target camera based on thelight sensitivity deviation of the first pixel in each pixel block andidentification data corresponding to each pixel block.

In this way, a physical characteristic of the target camera, that is, alight intensity value reflected by the target camera when the image isshot, is obtained, and an identity of the target camera is authenticatedbased on the light intensity value. There may be no need to improve thetarget camera, for example, program the target camera, store a key onthe target camera side, or perform encryption/decryption calculation onthe target camera side. Therefore, a problem that an authenticationprocess of the target camera fails due to an improvement of the targetcamera is effectively avoided, and security of the authenticationprocess of the target camera is further improved.

In an implementation, the identification data is obtained based on dataof a plurality of pixel blocks in a known image of a known camera, eachof the plurality of pixel blocks in the known image includes one thirdpixel and a plurality of fourth pixels, and the data of the plurality ofpixel blocks is perceived light intensity values of the third pixels andthe plurality of fourth pixels in the plurality of pixel blocks.

In an implementation, the identification data is a first vector or lightsensitivity deviations corresponding to the plurality of pixel blocks,and the light sensitivity deviation is a difference between a perceivedlight intensity value and a predicted light intensity value of the thirdpixel in each pixel block, where the first vector includes lightsensitivity deviations corresponding to target third pixels, and thetarget third pixels are third pixels corresponding to a preset quantityof highest light sensitivity deviations among light sensitivitydeviations corresponding to the third pixels in the plurality of pixelblocks.

Further, the third pixels in the plurality of pixel blocks are in aone-to-one correspondence with available pixels in the known image, andthe available pixels are pixels in the known image other than a fourthpixel located at an image boundary.

In this way, data used to identify the target camera can be comparedwith different prestored identification data, and the target camera isfurther accurately authenticated by using the physical characteristic ofthe target camera.

In an implementation, the authenticating the target camera based on thelight sensitivity deviation of the first pixel in each pixel block andidentification data corresponding to each pixel block includes setting asimilarity threshold based on a quantity of second target images and aquantity of the plurality of pixel blocks; calculating a similaritybetween the light sensitivity deviation of the first pixel in each pixelblock and the identification data; and comparing the similarity with thesimilarity threshold to authenticate the target image.

In this way, the similarity threshold can be flexibly set based on anactual situation, so that the similarity threshold is closer to a realauthentication process, thereby effectively improving accuracy ofauthenticating the target camera.

According to a third aspect, this application provides a cameraauthentication system, including a receiver, a processor, and a memory,where the receiver is configured to receive a video stream sent by ato-be-identified camera, the memory is configured to storeidentification data of the to-be-identified camera, and the processor isconfigured to perform the foregoing camera identification method.

According to a fourth aspect, this application provides a cameraauthentication system, including a receiver, a processor, and a memory,where the receiver is configured to receive a video stream sent by atarget camera, the memory is configured to store identification data ofa known camera, and the processor is configured to perform the foregoingcamera authentication method.

According to a fifth aspect, this application provides a terminal,including a camera authentication system and at least oneto-be-identified camera, where the to-be-identified camera is configuredto shoot a video stream and upload the shot video stream to the cameraauthentication system, and the camera authentication system isconfigured to perform the foregoing camera identification method.

According to a sixth aspect, this application provides a terminal,including a camera authentication system and at least one target camera,where the target camera is configured to shoot a video stream and uploadthe shot video stream to the camera authentication system, and thecamera authentication system is configured to perform the foregoingcamera authentication method.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a structure of a terminal according toan embodiment of this application;

FIG. 2 is a schematic diagram of a structure of a camera authenticationsystem according to an embodiment of this application;

FIG. 3 is a schematic diagram of a structure of a to-be-identifiedcamera according to an embodiment of this application;

FIG. 4 is a flowchart of a camera identification method according to anembodiment of this application;

FIG. 5 is a schematic diagram of a radio link control (RLC) beareraccording to an embodiment of this application;

FIG. 6 is a schematic diagram of available pixels according to anembodiment of this application;

FIG. 7 is a flowchart of an authentication method according to anembodiment of this application;

FIG. 8 is a schematic diagram of a structure of a target cameraaccording to an embodiment of this application;

FIG. 9 is a schematic diagram of a first similarity comparison resultaccording to an embodiment of this application; and

FIG. 10 is a schematic diagram of a second similarity comparison resultaccording to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

For terminals that need to perform automatic control, for example, aself-driving vehicle, a security protection facility, and an internet ofthings (IoT) system, accurate automatic control can be implemented onlythrough mutual cooperation between a camera and a control system. Usinga self-driving vehicle as an example, a camera needs to be disposed in aspecified part of the vehicle to shoot a corresponding picture. Forexample, a plurality of cameras are disposed at a head of the vehicle, atail of the vehicle, two sides of a vehicle body, and the inside of thevehicle, and an in-vehicle system (a control system) is deployed in thevehicle. The in-vehicle system analyzes a video stream uploaded by thecamera, to determine a vehicle condition of the vehicle, an environmentaround the vehicle, and the like, control each component of the vehicle(a steering wheel, a lamp, a horn, a window, a brake, a throttle, analarm, and the like) to work, and achieve an effect of self-driving.

In an example, a video stream uploaded by the camera of the terminal isa basis for the control system to deliver an accurate controlinstruction for a real situation of the terminal (a status of theterminal, an environment around the terminal, and the like). Therefore,it is particularly important to ensure accuracy of the video streamreceived by the control system. To ensure accuracy of the video streamreceived by the control system, it is necessary to ensure photographingquality of the camera. In addition, it is necessary to ensure that thevideo stream received by the terminal comes from a specified camera.This application describes in detail how to ensure that the video streamreceived by the terminal comes from the specified camera. The specifiedcamera mentioned in the embodiments of this application is a camerahaving a correspondence with the terminal, and the video stream shot bythe specified camera is used to provide the real situation of theterminal for the control system of the terminal. The specified cameramay be disposed on the terminal, or may be disposed at a specifiedposition outside the terminal. For example, a camera a is disposed on avehicle A, and the camera a is configured to shoot a reverse vehicleimage for the vehicle A. In this case, the camera a has a correspondencewith the vehicle A. Alternatively, a camera b is disposed in a parkingspace, and when the vehicle A is parked in the parking space, the camerab is configured to shoot a reverse vehicle image for the vehicle A. Inthis case, the camera b has a correspondence with the vehicle A. In anautomatic control process of the terminal, if some interfering camerasexist around the terminal, for example, a camera that does not have acorrespondence with the terminal, or a camera that has a correspondencewith the terminal but is illegally changed or replaced, the controlsystem of the terminal is likely to receive a video stream uploaded bythe camera. In this case, if the control system delivers a controlinstruction based on the video stream uploaded by the camera, a securityproblem is prone to occur. To avoid the foregoing case, after receivingan upload request of the camera, the control system of the terminalfirst authenticates the camera, and receives, only after the camera issuccessfully authenticated, the video stream uploaded by the camera, anddelivers a corresponding control instruction based on the video stream.It can be learned that the authentication process of the camera iscrucial to ensure security of automatic control of the terminal.

Most camera chips do not support hardware security modules. Therefore,data such as digital certificates and keys stored in cameras is easilystolen. If the data is stolen, reverse engineering can be performed tofind private keys of the digital certificates, symmetric keys,authentication algorithms, and the like. In this case, a mode of cameraauthentication based on a digital certificate and a key has a greatsecurity risk. In addition, if the camera is authenticated based on thedigital certificate, the key, and the like throughencryption/decryption, encryption/decryption calculation needs to beperformed on the camera side. Therefore, the camera needs to bepre-programmed, and efforts and costs are needed to pre-program thecamera. If the camera is purchased from a third party, it is necessaryto communicate with the third party about programming, but the thirdparty may not agree to program the camera. Therefore, not only executionis inconvenient, but also programming probably cannot be implemented,and further, camera authentication cannot be implemented.

The camera perceives intensity of incoming light by using a sensorarray. The sensor array is covered with a filter layer, and pixels onthe filter layer are in a one-to-one correspondence with pixels on thesensor array. Each pixel on the filter layer allows only light of aspecified color to pass, for example, only red, green, or blue light. Apixel arrangement on the filter layer is generally red green green blue(RGGB), red clear clear blue (RCCB), red clear clear clear (RCCC), orthe like. In this way, the incoming light is first filtered by thefilter layer to obtain light of a specified color on each pixel, and isincident onto a corresponding pixel of the sensor array. Duringproduction of the sensor array, due to factors such as a process andtechnology, different pixels on the sensor array have deviations inperception of light intensity values of incoming light, but for the sameincoming light, light intensity values perceived on a same pixel bydifferent sensor arrays having a same pixel arrangement are alsodifferent. For ease of description, in the embodiments of thisapplication, an intensity value of light that should be perceived oneach pixel by the sensor array is defined as a real light intensityvalue. Generally, the real light intensity value is close to a lightintensity value of the incoming light, and a light intensity valueactually perceived on each pixel on the sensor array is defined as aperceived light intensity value. For example, the incoming light has alight intensity value 15 and is incident on a sensor array A and asensor array B respectively, where perceived light intensity valuescorresponding to pixels A1, A2, and A3 on the sensor array A are 10, 12,and 14 respectively, and perceived light intensity values correspondingto pixels B1, B2, and B3 on the sensor array B are 11, 13, and 15respectively. There is no great difference between perceived lightintensity values corresponding to different sensor arrays, and theperceived light intensity values of the sensor arrays vary withdifferent real light intensity values. It is difficult to obtain a fixedstandard value. Therefore, it is not convenient to directly use theperceived light intensity values as identification data of the camera.If a difference between a real light intensity value and a perceivedlight intensity value is defined as a light sensitivity deviation, itcan be learned that light sensitivity deviations of the pixels A1, A2,and A3 on the sensor array A from the real light intensity value are 5,3, and 1 respectively, and that light sensitivity deviations of thepixels B1, B2, and B3 on the sensor array B from the real lightintensity value are 4, 2, and 0 respectively. In an example, the lightsensitivity deviations of pixels on the sensor array A and the sensorarray B for the incoming light are different, and the light sensitivitydeviation is a relatively stable value. Therefore, the light sensitivitydeviation may be used as identification data of the camera. The lightsensitivity deviation of the camera is determined by the real lightintensity value of the incoming light and a sensitometric characteristicof the sensor array, and is not caused by factors other than the camera.Therefore, if the light sensitivity deviation is used as theidentification data of the camera, it is equivalent to directly using aphysical characteristic of the camera to identify the camera. Therefore,there is no need to manually add other factors used for identificationto the camera, such as digital certificates and keys.

This application provides a camera identification method. The method isas follows.

FIG. 1 is a schematic diagram of a structure of a terminal according toan embodiment of this application. The terminal includes a cameraauthentication system and at least one to-be-identified camera. UsingFIG. 1 as an example, the terminal includes a camera authenticationsystem 1 and a to-be-identified camera 2. The camera authenticationsystem 1 communicates with the to-be-identified camera 2. Datatransmission may be performed by using a connection mode such asBLUETOOTH or WIFI DIRECT. The to-be-identified camera 2 is the specifiedcamera mentioned above.

FIG. 2 is a schematic diagram of a structure of a camera authenticationsystem according to an embodiment of this application. As shown in FIG.2 , the camera authentication system 1 includes a receiver 101, aprocessor 102, and a memory 103. The receiver 101, the processor 102,and the memory 103 are coupled to each other.

The receiver mentioned in this embodiment of this application may be acommunications interface on a terminal device. The communicationsinterface may be one or more fiber link interfaces, Ethernet interfaces,microwave link interfaces, copper wire interfaces, or the like, andincludes a network adapter (network adapter), a network interface card(network interface card), a local area network (LAN) receiver (LANadapter), a network interface controller (NIC), a modem, or the like.The interface unit 130 may be an independent component, or may bepartially or completely integrated or packaged in the processor 110 as apart of the processor 110. The receiver may be configured to receive avideo stream uploaded by the to-be-identified camera.

In this embodiment of this application, the processor 110 of the controldevice 100 may include one or more processing units, for example, asystem-on-a-chip (SoC), a central processing unit (CPU), amicrocontroller (MCU), and a storage controller. Different processingunits may be independent components, or may be integrated into one ormore processors. In a possible implementation, the camera authenticationsystem 1 may be an original control system of the terminal. For example,an authentication function corresponding to the camera authenticationsystem 1 is added to the original control system through programming,that is, the processor 102 and the original control system are the same.In another possible implementation, the camera authentication system 1may alternatively be a system independent of the original controlsystem, that is, the processor 102 is a processor independent of theoriginal control system. The processor may be configured to analyze thevideo stream uploaded by the to-be-identified camera, and generate acorresponding control instruction based on an analysis result.

The memory mentioned in this embodiment of this application may includeone or more storage units, for example, may include a volatile memory,for example, a dynamic random-access memory (DRAM) or a staticrandom-access memory (SRAM); and may further include a non-volatilememory (NVM), for example, a read-only memory (ROM) or a flash memory.Different storage units may be independent components, or may beintegrated or packaged in one or more processors or communicationsinterfaces, and become a part of the processor or communicationsinterface. The memory is configured to store identification datacorresponding to the to-be-identified camera and each computerinstruction.

The camera authentication system 1 may further include a transmitter(not shown in the drawing). The transmitter may alternatively be acommunications interface on the terminal device. The transmitter and thereceiver 101 may be a same communications interface, or may be differentcommunications interfaces. The transmitter may be configured to sendeach control instruction generated by the processor.

FIG. 3 is a schematic diagram of a structure of a to-be-identifiedcamera according to an embodiment of this application. In thisembodiment of this application, a camera that needs to be identified isdefined as a to-be-identified camera. As shown in FIG. 3 , theto-be-identified camera 2 includes a filter layer 201, a sensor array202, a processor 203, and a transmitter 204. The filter layer 201 isdisposed on an upper surface of the sensor array 202. The sensor array202, the processor 203, and the transmitter 204 are coupled to eachother.

The filter layer 201 mentioned in this embodiment of this applicationmay be a single filter layer or three filter layers, and is configuredto filter a color of incoming light. Pixels on the filter layer 201 arein a one-to-one correspondence with pixels on the sensor array 202. Anarrangement of the pixels on the filter layer 201 may be flexibly setbased on an actual filtering requirement.

The sensor array 202 mentioned in this embodiment of this applicationmay be a charge-coupled device (CCD), a complementarymetal-oxide-semiconductor (CMOS), or the like, and is configured toperceive a light intensity value of incoming light.

In this embodiment of this application, the processor 110 of the controldevice 100 may include one or more processing units, for example, a SoC,a CPU, a MCU, and a storage controller. Different processing units maybe independent components, or may be integrated into one or moreprocessors, and are configured to process captured image data togenerate a video stream.

The transmitter mentioned in this embodiment of this application may bea communications interface on a target camera. The communicationsinterface may be one or more fiber link interfaces, Ethernet interfaces,microwave link interfaces, copper wire interfaces, or the like, andincludes a network adapter, a network interface card, a LAN receiver, aNIC, a modem, or the like. The interface unit 130 may be an independentcomponent, or may be partially or completely integrated or packaged inthe processor 110 as a part of the processor 110. The transmitter isconfigured to upload the video stream generated by the processor to thecamera authentication system of the terminal.

The to-be-identified camera 2 may further include a power supply (notshown in the drawing). The power supply may be a power supply of theterminal, or may be a power supply independent of the terminal. Theto-be-identified camera 2 may further include another component used foran image shooting function or the like. Details are not describedherein.

For the to-be-identified camera provided in this embodiment of thisapplication, there is no need to improve an identification function, forexample, pre-programming about the identification function, and storageof a private key, a key, and a digital certificate.

FIG. 4 is a flowchart of a camera identification method according to anembodiment of this application. Identification data of ato-be-identified camera may be generated according to the procedureshown in FIG. 4 . Details are as follows.

S101: Extract a first target image from a video stream sent by ato-be-identified camera.

S102: Obtain a plurality of pixel blocks from the first target image,where the pixel block includes one first pixel and a plurality of secondpixels.

S103: Establish, based on a perceived light intensity value of the firstpixel and perceived light intensity values of the plurality of secondpixels in each pixel block, a linear relationship model corresponding tothe to-be-identified camera, where the perceived light intensity valueis a light intensity value corresponding to the video stream.

In an example, the linear relationship model complies with the followingformula:

$x_{a,b} = {{\underset{{({j,k})} \neq {({a,b})}}{\sum\limits_{{1 \leq j},{k \leq n}}}{c_{j,k}x_{j,k}}} + p}$

x_(a,b) represents the predicted light intensity values of the firstpixels, wherein the first pixels are located in a row a and a column bin the plurality of pixel blocks, wherein c_(j,k) represents a firstconstant, wherein x_(j,k) represents perceived light intensity values ofpixels in a row j and a column k in the plurality of pixel blocks, andwherein p represents a second constant.

S104: Substitute perceived light intensity values of a plurality ofsecond pixels in a plurality of target pixel blocks into the linearrelationship model, to obtain predicted light intensity values of firstpixels in the target pixel blocks, where the plurality of target pixelblocks are obtained from an image shot by the to-be-identified camera.

S105: Calculate differences between the predicted light intensity valuesand perceived light intensity values of the first pixels in theplurality of target pixel blocks, to obtain light sensitivity deviationsof the first pixels in the plurality of target pixel blocks and use thelight sensitivity deviations as identification data of theto-be-identified camera.

In this embodiment of this application, a video stream uploaded by ato-be-identified camera 2 includes at least one picture. Theto-be-identified camera 2 captures the video stream, and uploads thecaptured video stream to a camera authentication system 1. The cameraauthentication system 1 receives the video stream by using a receiver101, and extracts, by using a processor 102, an image used to generateidentification data, that is, the first target image. The first targetimage may be one image. To improve a fit between the identification dataand a capability of perceiving incoming light by the to-be-identifiedcamera 2, the first target image may be a plurality of images. One firsttarget image is used as an example for description. The first targetimage is divided into a plurality of pixel blocks, and each pixel blockincludes n×n pixels, where n>3, and n is an odd number, for example, 3×3or 5×5. A size of each pixel block may be the same or different, and thesize of the pixel block may be flexibly set based on an actualrequirement. FIG. 5 is a schematic diagram of a pixel block according toan embodiment of this application. A pixel block including 5×5 pixels isused as an example in FIG. 5 . A pixel A located at a central positionof the pixel block is a first pixel, and other pixels are second pixels.The pixels in the pixel block are in a one-to-one correspondence withpixels on a sensor array 202.

When the first target image is divided, in a possible implementation,two adjacent pixel blocks may include some same pixels. Still using a5×5 pixel block as an example, if boundary pixels of the two adjacentpixel blocks are pixels in a same row or column, for the first targetimage including 50×50 pixels, 144 pixel blocks may be obtained afterdivision. In another implementation, two adjacent pixel blocks do notinclude same pixels. Still using a 5×5 pixel block as an example, ifboundary pixels of the two adjacent pixel blocks are adjacentlydistributed in the first target image, for the first target imageincluding 50×50 pixels, 100 pixel blocks may be obtained after division.In this embodiment of this application, only a complete pixel block isselected for an operation. FIG. 6 is a schematic diagram of availablepixels according to an embodiment of this application. In thisembodiment of this application, only a complete pixel block is selectedfor an operation, and a first pixel is located at a central position ofthe pixel block. Therefore, for the first target image, the first pixelis unlikely to appear at an image boundary. Using a 3×3 pixel block asan example, if the pixel block is located in an upper left corner of thefirst target image, as shown in FIG. 6 , shadow parts are second pixelslocated at the image boundary, and these pixels are unlikely to becomethe first pixel. For another example, if the pixel block is a 5×5 pixelblock, and the pixel block is located in the upper left corner of thefirst target image, second pixels in two upper rows and two left columnsin the pixel block are unlikely to become the first pixel. Using this asan example, the pixels that are unlikely to become the first pixel maybe determined in the first target image, and all other pixels than thesepixels may become the first pixel, that is, an available pixel in thefirst target image.

The processor 102 may analyze the first target image, to learn aperceived light intensity value corresponding to each pixel in the firsttarget image, and establish a linear relationship model based on theperceived light intensity value corresponding to the first pixel and theperceived light intensity values of the plurality of second pixels inthe same pixel block. In other words, the perceived light intensityvalues of the plurality of second pixels are used to represent theperceived light intensity value corresponding to the first pixel. Forexample, x_(m,n) represents a perceived light intensity value of a pixellocated in a row m and a column n in the pixel block, and {circumflexover (x)}_(m,n) represents a perceived light intensity valuecorresponding to the pixel located in the row m and the column n in thepixel block. Using a 5×5 pixel block as an example, a perceived lightintensity value corresponding to a first pixel is {circumflex over(x)}_(3,3), and perceived light intensity values of second pixels arex_(1,1), x_(1,2), x_(1,3), x_(1,4), x_(1,5), x_(2,1), x_(2,2), x_(2,3),x_(2,4), x_(2,5), x_(3,1), x_(3,2), x_(3,4), x_(3,5), x_(4,1), x_(4,2),x_(4,3), x_(4,4), x_(4,5), x_(5,1), x_(5,2), x_(5,3), x_(5,4), andx_(5,5) in sequence. A linear relationship between the perceived lightintensity value corresponding to the first pixel and the perceived lightintensity values of the second pixels may be established, as shown in aformula (1):

{circumflex over (x)} _(3,3) =c _(1,1) X _(1,1) +c _(1,2) X _(1,2) +c_(1,3) X _(1,3) +c _(1,4) X _(1,4) +c _(1,5) X _(1,5) +c _(2,1) X _(2,1)+c _(2,2) X _(2,2) +c _(2,3) X _(2,3) +c _(2,4) X _(2,4) +c _(2,5) X_(2,5) +c _(3,1) X _(3,1) +c _(3,2) X _(3,2) +c _(3,4) X _(3,4) +c_(3,5) X _(3,5) +c _(4,1) X _(4,1) +c _(4,2) X _(4,2) +c _(4,3) X _(4,3)+c _(4,4) X _(4,4) +c _(4,5) X _(4,5) +c _(5,1) X _(5,1) +c _(5,2) X_(5,2) +c _(5,3) X _(5,3) +c _(5,4) X _(5,4) +c _(5,5) X _(5,5) +P  (1)

The formula (1) may be expressed as follows:

$\begin{matrix}{\hat{x_{3,3}} = {{\Sigma\underset{{({j,k})} \neq {({3,3})}}{{1 \leq j},{k \leq 5}}c_{j,k}x_{j,k}} + p}} & (2)\end{matrix}$

Herein, c_(j,k) represents a first constant, x_(j,k) represents aperceived light intensity value of a pixel in a row j and a column k inthe pixel block, and p represents a second constant. In this way, theperceived light intensity values of all the second pixels in the pixelblock may be used to represent the perceived light intensity valuecorresponding to the first pixel.

There is a linear relationship between the perceived light intensityvalue corresponding to the first pixel in each pixel block and theperceived light intensity values corresponding to the second pixels ineach pixel block. Therefore, the perceived light intensity valuecorresponding to the first pixel in each pixel block may be representedby the perceived light intensity values of the second pixelscorresponding to the first pixel in each pixel block. It can be learnedfrom the foregoing description that, each pixel on the camera shouldcorrespond to one real light intensity value when there is no impactfrom an external factor such as a process. To predict the real lightintensity value corresponding to each pixel, the first constant and thesecond constant in the formula (2) may be optimized through training, sothat a linear relationship model that can predict a real light intensityvalue (predicted light intensity value) corresponding to the first pixelis obtained.

In an example, the linear relationship model may be trained by using alinear regression learning method. In this way, the first constant andthe second constant in the linear relationship model are adjusted, sothat the predicted light intensity value of the first pixel obtainedthrough calculation by using the linear relationship model can beinfinitely close to a real light intensity value of the incoming light.

By using the perceived light intensity values of the plurality of secondpixels in each pixel block as an input value of an initial linearrelationship model and using the perceived light intensity value of thefirst pixel in each pixel block as an output value of the initial linearrelationship model, each constant in the initial linear relationshipmodel is trained, to obtain the linear relationship model.

During training of the linear relationship model, a plurality of pixelblocks in the first target image are used as samples, a pixel block isselected randomly, and a linear relationship model is established basedon a perceived light intensity value corresponding to a first pixel andperceived light intensity values of second pixels in the pixel block.Refer to the formula (2). In this case, the pixel block is used as aprevious pixel block, and a new pixel block is selected from the firsttarget image as a current pixel block to train the linear relationshipmodel obtained from the previous pixel block. A perceived lightintensity value corresponding to a first pixel and perceived lightintensity values of second pixels in the current pixel block aresubstituted into the linear relationship model. Adjusting the firstconstant and the second constant can make the obtained linearrelationship model close to the perceived light intensity valuecorresponding to the first pixel in the previous pixel block and theperceived light intensity value corresponding to the first pixel in thecurrent pixel block at the same time. The foregoing process is repeated,and each pixel block in the first target image is used to train thelinear relationship model. A predicted light intensity value of a firstpixel obtained by substituting perceived light intensity values ofsecond pixels in any pixel block into the trained linear relationshipmodel is infinitely close to a real light intensity value correspondingto the pixel. In this way, the predicted light intensity value of thefirst pixel in any pixel block may be predicted by using the linearrelationship model, and the predicted light intensity value is used toreplace the real light intensity value corresponding to the first pixel.

Further, when a plurality of first target images are included, eachfirst target image may train a linear relationship model according tothe foregoing process, and a subsequent first target image may alsotrain, according to the foregoing process, a linear relationship modelcorresponding to a previous first target image. To ensure trainingquality of the linear relationship model, a quantity of first targetimages may be increased, and a plurality of video streams uploaded bythe to-be-identified camera may also be selected, where the videostreams may be distributed in different time segments (real lightintensity values with different incoming light, and the like), and thelike.

After the linear relationship model is obtained, the predicted lightintensity value of the first pixel in each pixel block in the firsttarget image may be predicted. In this way, after a difference betweenthe predicted light intensity value of the first pixel and the perceivedlight intensity value of the first pixel is calculated, the lightsensitivity deviation corresponding to each first pixel may be obtained.These light sensitivity deviations may be used as identification data ofthe to-be-identified camera and stored for a subsequent authenticationprocess. A target pixel block may be selected for calculating apredicted light intensity value of a first pixel. In this embodiment ofthis application, the target pixel block may be all pixel blocks in thefirst target image, or may be a specified pixel block in the firsttarget image, for example, a pixel block at a specified position or apixel block with a specified identifier. If the target pixel blocks cansatisfy accuracy of the generated identification data, a calculationamount can be effectively reduced, and identification efficiency can beimproved. The target pixel blocks may be pixel blocks in a same imageshot by the to-be-identified camera, or may be pixel blocks in differentimages shot by the to-be-identified camera; and may be pixel blocks usedto train a linear relationship model, or may be new pixel blocks. Thisis not limited in this embodiment of this application.

In an example, all light sensitivity deviations corresponding to atleast one first target image may be stored, and used as identificationdata of the to-be-identified camera, or a light sensitivity deviationcorresponding to a specified first pixel in at least one first targetimage may be stored, and used as identification data of theto-be-identified camera, or a light sensitivity deviation correspondingto a target first pixel in at least one first target image, for example,N largest light sensitivity deviations, may be stored, and used asidentification data of the to-be-identified camera.

After the identification (ID) data of the to-be-identified camera 2 isobtained through the foregoing process, the identification data may bestored in a memory 103 in the camera authentication system 1, to providea data basis for subsequent authentication of a target camera.Certainly, the identification data of the to-be-identified camera 2 mayalternatively be stored on a cloud platform, a cloud server, or thelike. In this way, the camera authentication system 1 does not need tolocally store the identification data of the to-be-identified camera 2,and may obtain the identification data of the to-be-identified camera 2from the cloud platform, the cloud server, or the like. Theidentification data may be stored in a form of a data pair, for example,“a device ID of the to-be-identified camera 2—identification data”, “acommunications interface name of the to-be-identified camera2—identification data”, or “a geographical location of theto-be-identified camera 2—identification data”. When ato-be-authenticated camera sends a video stream, device parameters suchas a device ID, a communications interface name, or a geographicallocation are carried. In this way, the camera authentication system 1can accurately obtain, based on these device parameters, identificationdata corresponding to different to-be-authenticated cameras.

According to the foregoing method, identification data of each cameracorresponding to a terminal 1 may be generated, so that theidentification data can be used by the terminal 1 to authenticate thecamera.

FIG. 7 is a flowchart of a camera authentication method according to anembodiment of this application. As shown in FIG. 7 , the method includesthe following steps.

S201: Extract a second target image from a video stream sent by a targetcamera.

S202: Obtain a plurality of pixel blocks from the second target image,where each of the plurality of pixel blocks includes one first pixel anda plurality of second pixels.

S203: Substitute perceived light intensity values of the plurality ofsecond pixels in the plurality of pixel blocks into a linearrelationship model, to obtain a predicted light intensity value of thefirst pixel in each of the plurality of pixel blocks.

S204: Calculate a difference between the predicted light intensity valueand a perceived light intensity value of each first pixel, to obtain alight sensitivity deviation of each first pixel.

S205: Authenticate the target camera based on the light sensitivitydeviation of the first pixel in each pixel block and identification datacorresponding to each pixel block.

FIG. 8 is a schematic diagram of a structure of a target cameraaccording to an embodiment of this application. In this embodiment ofthis application, a to-be-authenticated camera is defined as a targetcamera. As shown in FIG. 8 , the target camera 3 includes a filter layer301, a sensor array 302, a processor 303, and a transmitter 304. For aspecific structure of the target camera 3, refer to the structure of theto-be-identified camera 2. Details are not described herein again. Thetarget camera 3 provided in this embodiment of this applicationcorresponds to the to-be-identified camera 2 mentioned above, that is,has a same device ID, communications interface name, geographicallocation, and the like.

Referring to a data transmission relationship between the cameraauthentication system 1 and the to-be-identified camera 2 in FIG. 1 ,after a terminal is connected to the target camera 3, the cameraauthentication system 1 receives, by using the receiver 101, a videostream sent by the target camera 3. The processor 102 may extract atleast one second target image from the video stream, for performingauthentication. In this embodiment of this application, extraction ofone second target image is used for description. The second target imageis divided into a plurality of pixel blocks in the foregoing manner ofdividing the first target image. Based on the pixel blocks obtainedafter division, a predicted light intensity value corresponding to afirst pixel in each pixel block is obtained through calculation by usingthe foregoing obtained linear relationship model. A specific process isas follows, such as obtaining a perceived light intensity value of eachsecond pixel in the pixel block, and inputting each perceived lightintensity value into the linear relationship model, to obtain thepredicted light intensity value of the first pixel through calculation.The processor 102 continues to obtain a perceived light intensity valueof the first pixel in each pixel block. It can be learned from theforegoing description that a difference (light sensitivity deviation)between the perceived light intensity value and the predicted lightintensity value of the first pixel corresponding to each camera isdifferent. The target camera 3 that needs to be authenticated also has aunique corresponding light sensitivity deviation. Therefore, the lightsensitivity deviation needs to be calculated and used as authenticationdata of the target camera 3. In an example, the light sensitivitydeviation corresponding to the first pixel may be obtained bycalculating a difference between the predicted light intensity value andthe perceived light intensity value of the first pixel. In this way, thetarget camera 3 may be authenticated based on the light sensitivitydeviation of each first pixel. Details are as follows.

Identification data of a known camera is prestored in the terminal 1 ora cloud end, and the known camera is a camera that has a correspondencewith the target camera. For the description of the correspondence, referto the foregoing description. For a process of identifying the knowncamera, refer to the foregoing description. In this embodiment of thisapplication, the to-be-identified camera 2 is used as a known camera fordescription. In this embodiment, a third pixel of the known camera isequivalent to the first pixel of the to-be-identified camera 2, and afourth pixel of the known camera is equivalent to the second pixel ofthe to-be-identified camera 2.

In an implementation, the identification data stored in the terminal 1or the cloud end is light sensitivity deviations of all first pixels.Therefore, the light sensitivity deviations of all the first pixels needto be obtained from the target camera 3 correspondingly, and the targetcamera 3 may be authenticated by comparing light sensitivity deviationsof all first pixels of the target camera 3 with those of theto-be-identified camera 2. In an example, in an implementation 1, adifference between light sensitivity deviations corresponding to firstpixels at a same position may be calculated, and when a quantity ofdeviations whose differences are less than or equal to a differencethreshold is greater than or equal to a quantity threshold, it may beconsidered that a similarity between a light sensitivity deviation ofthe target camera 3 and a light sensitivity deviation of theto-be-identified camera 2 is relatively high, and it may be determinedthat the target camera 3 is authenticated successfully, that is, thetarget camera 3 is the to-be-identified camera 2. Conversely, when thequantity of deviations whose differences are less than or equal to thedifference threshold is less than the quantity threshold, it may beconsidered that the similarity between the light sensitivity deviationof the target camera 3 and the light sensitivity deviation of theto-be-identified camera 2 is relatively low, and it may be determinedthat the target camera 3 fails to be authenticated, that is, the targetcamera 3 is not the to-be-identified camera 2. In an implementation 2, aratio of light sensitivity deviations corresponding to first pixels at asame position may be calculated, and when a quantity of deviations whoseratios are greater than or equal to a ratio threshold is greater than orequal to a quantity threshold, it may be considered that a similaritybetween a light sensitivity deviation of the target camera 3 and a lightsensitivity deviation of the to-be-identified camera 2 is relativelyhigh, and it may be determined that the target camera 3 is authenticatedsuccessfully, that is, the target camera 3 is the to-be-identifiedcamera 2. Conversely, when the quantity of deviations whose ratios aregreater than or equal to the ratio threshold is less than the quantitythreshold, it may be considered that the similarity between the lightsensitivity deviation of the target camera 3 and the light sensitivitydeviation of the to-be-identified camera 2 is relatively low, and it maybe determined that the target camera 3 fails to be authenticated, thatis, the target camera 3 is not the to-be-identified camera 2. In animplementation 3, the light sensitivity deviation corresponding to eachfirst pixel may be considered as a vector. For example, theto-be-identified camera 2 corresponds to a first vector, and the targetcamera 3 corresponds to a second vector. In this way, a similaritybetween the target camera 3 and the to-be-identified camera 2 iscalculated by calculating a similarity between the first vector and thesecond vector. For example, the two vectors are calculated by using acosine similarity or another method. For example, the similarity iscalculated by using a formula (3):

$\begin{matrix}{\frac{x \cdot y}{\left. x||{y} \right.} = \frac{\sum_{i = 1}^{n = 1}{x_{i}y_{i}}}{\sqrt{\sum_{i = 1}^{n}x_{i}^{2}}\sqrt{\sum_{i = 1}^{n}x_{i}^{2}}}} & (3)\end{matrix}$

Herein, x represents a light sensitivity deviation corresponding to onefirst pixel of the to-be-identified camera, y represents a lightsensitivity deviation of a first pixel that is on the target camera andcorresponding to x, i represents a number corresponding to the lightsensitivity deviation, and n represents a total quantity of lightsensitivity deviations.

In this way, the similarity between the target camera 3 and theto-be-identified camera 2 can be accurately calculated by using theforegoing formula, to authenticate the target camera 3. FIG. 9 is aschematic diagram of a first similarity comparison result according toan embodiment of this application. FIG. 10 is a schematic diagram of asecond similarity comparison result according to an embodiment of thisapplication. As shown in FIG. 9 , if there are 50 second target imagesand each second target image includes a vector including lightsensitivity deviations of 100 first pixels, a similarity between vectorsof a same camera is from 0.369 to 0.652, and a similarity betweenvectors of different cameras is almost 0. As shown in FIG. 10 , if thereare 250 to 500 second target images, and each second target imageincludes a vector including light sensitivity deviations of 10 firstpixels, a similarity between vectors of a same cameras is from 0.959 to0.998, and a similarity between vectors of different cameras is 0. Itcan be learned that different quantities of second target images and aquantity of first pixels selected from each second target image affectsvalues of similarities between vectors of the same camera. Therefore,similarity tests need to be performed in advance to learn similaritiescorresponding to different criteria, and the similarities are stored,and used as similarity criteria when the target camera 3 isauthenticated. In this way, a problem that the target camera 3 cannot beaccurately authenticated due to an incorrect setting of the similaritythreshold is avoided. For example, when a vector used for authenticatingthe to-be-authenticated camera is that a quantity of first target imagesis 50 and that each first target image includes light sensitivitydeviations of 100 first pixels, the similarity may be set to 0.369; orwhen a vector used for authenticating the to-be-authenticated camera isthat a quantity of first target images is 250 to 500 and that each firsttarget image includes light sensitivity deviations of 10 first pixels,the similarity may be set to 0.959.

Therefore, the to-be-authenticated target camera 3 can be authenticatedby comparing light sensitivity deviations of almost all pixels on thesensor array, and authentication accuracy can be improved.

In an implementation, the identification data of the to-be-identifiedcamera 2 stored in the terminal 1 or the cloud end is a lightsensitivity deviation of a specified first pixel, where the specifiedfirst pixel is a first pixel at a specified position or a first pixelhaving a specified identifier, or a first pixel that is set based onhistorical data, or the like. Therefore, the light sensitivity deviationof the specified first pixel needs to be obtained correspondingly fromthe target camera 3, and the target camera 3 can be authenticated bycomparing the light sensitivity deviation of the specified first pixelof the target camera 3 with that of the to-be-identified camera 2. For aspecific comparison process, refer to the three implementations in thefirst implementation. Details are not described herein again.

In this way, the target camera 3 can be authenticated by using lightsensitivity deviations of fewer pixels. On a basis of ensuringauthentication accuracy, comparison workload can be reduced, andauthentication efficiency can be improved.

In an implementation, the identification data of the to-be-identifiedcamera 2 stored in the terminal 1 or the cloud end is target lightsensitivity deviations, and the target light sensitivity deviations area preset quantity of highest light sensitivity deviations among thelight sensitivity deviations corresponding to the first pixels. Forexample, if the preset quantity is 3, and the light sensitivitydeviations are 0.1, 0.4, 0.1, 0.5, and 0.6 respectively, the targetlight sensitivity deviations are 0.4, 0.5, and 0.6. Therefore, a targetlight sensitivity deviation corresponding to the target camera 3 needsto be obtained correspondingly from the target camera 3, and the targetcamera 3 can be authenticated by comparing the target light sensitivitydeviation of the target camera 3 with that of the to-be-identifiedcamera 2. For a specific comparison process, refer to the threeimplementations in the first implementation. Details are not describedherein again.

Because the target camera 3 is authenticated by comparing pixels havinglight sensitivity deviations, the authentication accuracy and validitycan be effectively improved. In addition, because a quantity of pixelsfor comparison is relatively small, comparison workload can beeffectively reduced, and authentication efficiency can be improved.

In addition, another type of light sensitivity deviation may also beselected as identification data of the to-be-identified camera 2, andcomparison work between the target camera 3 and the to-be-identifiedcamera 2 is performed. Details are not illustrated herein.

After the target camera 3 is authenticated, the processor 102 of thecamera authentication system 1 needs to generate a corresponding controlinstruction based on an authentication result. For example, if theauthentication result is that the authentication succeeds, the processor102 generates a control instruction such as a video data response, forexample, a sunroof control instruction, a brake instruction, or arefueling instruction. If the authentication result is that theauthentication fails, the processor 102 generates a control instructionsuch as an alarm instruction or a block video data response.

According to the camera identification method, authentication method,system, and terminal provided in the embodiments of this application,the corresponding identification data, that is, light sensitivitydeviations of a plurality of first pixels in the first target image, canbe generated for the to-be-identified camera. The identification data isa physical characteristic corresponding to the to-be-identified camera.As long as the to-be-identified camera remains unchanged, theidentification data will not be lost or changed. Therefore, a stablereference basis can be provided for authenticating the target camera.Further, authentication data is generated based on the light sensitivitydeviation of the target camera. In this way, the target camera can beaccurately authenticated by comparing the identification data and theauthentication data. There is no need to improve the target camera, forexample, program the target camera, store a key on the target cameraside, or perform encryption/decryption calculation on the target cameraside. Therefore, a problem that an authentication process of the targetcamera fails due to an improvement of the target camera is effectivelyavoided, and security of the authentication process of the target camerais further improved.

The objectives, technical solutions, and beneficial effects of thepresent disclosure are further described in detail in the foregoingspecific implementations. It should be understood that the foregoingdescriptions are merely specific implementations of the presentdisclosure, but are not intended to limit the protection scope of thepresent disclosure. Any modification, equivalent replacement,improvement, or the like made based on the technical solutions of thepresent disclosure shall fall within the protection scope of the presentdisclosure.

What is claimed is:
 1. A camera authentication method, applied to acamera authentication system and used to authenticate a target camera,wherein the method comprises: extracting a second target image from avideo stream sent by the target camera; obtaining a plurality of pixelblocks from the second target image, wherein each of the plurality ofpixel blocks comprises one first pixel and a plurality of second pixels;substituting perceived light intensity values of the plurality of secondpixels in the plurality of pixel blocks into a linear relationshipmodel, to obtain a predicted light intensity value of the first pixel ineach of the plurality of pixel blocks; calculating a difference betweenthe predicted light intensity value and a perceived light intensityvalue of each first pixel, to obtain a light sensitivity deviation ofeach first pixel; and authenticating the target camera based on thelight sensitivity deviation of the first pixel in each pixel block andidentification data corresponding to each pixel block.
 2. The methodaccording to claim 1, wherein the identification data is obtained basedon data of a plurality of pixel blocks in a known image of a knowncamera, each of the plurality of pixel blocks in the known imagecomprises one third pixel and a plurality of fourth pixels, and the dataof the plurality of pixel blocks is perceived light intensity values ofthe third pixels and the plurality of fourth pixels in the plurality ofpixel blocks.
 3. The method according to claim 2, wherein theidentification data is a first vector or light sensitivity deviationscorresponding to the plurality of pixel blocks, and the lightsensitivity deviation is a difference between a perceived lightintensity value and a predicted light intensity value of the third pixelin each pixel block, wherein the first vector comprises lightsensitivity deviations corresponding to target third pixels, and thetarget third pixels are third pixels corresponding to a preset quantityof highest light sensitivity deviations among light sensitivitydeviations corresponding to the third pixels in the plurality of pixelblocks.
 4. The method according to claim 3, wherein the third pixels inthe plurality of pixel blocks are in a one-to-one correspondence withavailable pixels in the known image, and the available pixels are pixelsin the known image other than a fourth pixel located at an imageboundary.
 5. The method according to claim 1, wherein the authenticatingthe target camera based on the light sensitivity deviation of the firstpixel in each pixel block and identification data corresponding to eachpixel block comprises: setting a similarity threshold based on aquantity of second target images and a quantity of the plurality ofpixel blocks; calculating a similarity between the light sensitivitydeviation of the first pixel in each pixel block and the identificationdata; and comparing the similarity with the similarity threshold toauthenticate the target camera.
 6. The method according to claim 1,wherein the linear relationship model complies with the followingformula:${x_{a,b} = {{\underset{{({j,k})} \neq {({a,b})}}{\sum\limits_{{1 \leq j},{k \leq n}}}{c_{j,k}x_{j,k}}} + p}},$wherein x_(a,b) represents a predicted light intensity value of thefirst pixel in the pixel block, the first pixel is located in a row aand a column b in the pixel block, c_(j,k) represents a first constant,x_(j,k) represents a perceived light intensity value of a pixel in a rowj and a column k in the pixel block, and p represents a second constant.7. A camera authentication system, comprising a receiver, a processor,and a memory, wherein the receiver is configured to receive a videostream sent by a to-be-identified camera, the memory is configured tostore identification data of the to-be-identified camera, and theprocessor is configured to: extract a second target image from a videostream sent by the target camera; obtain a plurality of pixel blocksfrom the second target image, wherein each of the plurality of pixelblocks comprises one first pixel and a plurality of second pixels;substitute perceived light intensity values of the plurality of secondpixels in the plurality of pixel blocks into a linear relationshipmodel, to obtain a predicted light intensity value of the first pixel ineach of the plurality of pixel blocks; calculate a difference betweenthe predicted light intensity value and a perceived light intensityvalue of each first pixel, to obtain a light sensitivity deviation ofeach first pixel; and authenticate the target camera based on the lightsensitivity deviation of the first pixel in each pixel block andidentification data corresponding to each pixel block.
 8. The cameraauthentication system according to claim 7, wherein the identificationdata is obtained based on data of a plurality of pixel blocks in a knownimage of a known camera, each of the plurality of pixel blocks in theknown image comprises one third pixel and a plurality of fourth pixels,and the data of the plurality of pixel blocks is perceived lightintensity values of the third pixels and the plurality of fourth pixelsin the plurality of pixel blocks.
 9. The camera authentication systemaccording to claim 8, wherein the identification data is a first vectoror light sensitivity deviations corresponding to the plurality of pixelblocks, and the light sensitivity deviation is a difference between aperceived light intensity value and a predicted light intensity value ofthe third pixel in each pixel block, wherein the first vector compriseslight sensitivity deviations corresponding to target third pixels, andthe target third pixels are third pixels corresponding to a presetquantity of highest light sensitivity deviations among light sensitivitydeviations corresponding to the third pixels in the plurality of pixelblocks.
 10. The camera authentication system according to claim 9,wherein the third pixels in the plurality of pixel blocks are in aone-to-one correspondence with available pixels in the known image, andthe available pixels are pixels in the known image other than a fourthpixel located at an image boundary.
 11. The camera authentication systemaccording to claim 7, wherein the processor is configured to: set asimilarity threshold based on a quantity of second target images and aquantity of the plurality of pixel blocks; calculate a similaritybetween the light sensitivity deviation of the first pixel in each pixelblock and the identification data; and compare the similarity with thesimilarity threshold to authenticate the target camera.
 12. The cameraauthentication system according to claim 7, wherein the linearrelationship model complies with the following formula:${x_{a,b} = {{\underset{{({j,k})} \neq {({a,b})}}{\sum\limits_{{1 \leq j},{k \leq n}}}{c_{j,k}x_{j,k}}} + p}},$wherein x_(a,b) represents a predicted light intensity value of thefirst pixel in the pixel block, the first pixel is located in a row aand a column b in the pixel block, c_(j,k) represents a first constant,x_(j,k) represents a perceived light intensity value of a pixel in a rowj and a column k in the pixel block, and p represents a second constant.13. A terminal, comprising a camera authentication system and at leastone to-be-identified camera, wherein the to-be-identified camera isconfigured to: shoot a video stream and upload the shot video stream tothe camera authentication system, and the camera authentication systemis configured to: extract a second target image from a video stream sentby the target camera; obtain a plurality of pixel blocks from the secondtarget image, wherein each of the plurality of pixel blocks comprisesone first pixel and a plurality of second pixels; substitute perceivedlight intensity values of the plurality of second pixels in theplurality of pixel blocks into a linear relationship model, to obtain apredicted light intensity value of the first pixel in each of theplurality of pixel blocks; calculate a difference between the predictedlight intensity value and a perceived light intensity value of eachfirst pixel, to obtain a light sensitivity deviation of each firstpixel; and authenticate the target camera based on the light sensitivitydeviation of the first pixel in each pixel block and identification datacorresponding to each pixel block.
 14. The terminal according to claim13, wherein the identification data is obtained based on data of aplurality of pixel blocks in a known image of a known camera, each ofthe plurality of pixel blocks in the known image comprises one thirdpixel and a plurality of fourth pixels, and the data of the plurality ofpixel blocks is perceived light intensity values of the third pixels andthe plurality of fourth pixels in the plurality of pixel blocks.
 15. Theterminal according to claim 14, wherein the identification data is afirst vector or light sensitivity deviations corresponding to theplurality of pixel blocks, and the light sensitivity deviation is adifference between a perceived light intensity value and a predictedlight intensity value of the third pixel in each pixel block, whereinthe first vector comprises light sensitivity deviations corresponding totarget third pixels, and the target third pixels are third pixelscorresponding to a preset quantity of highest light sensitivitydeviations among light sensitivity deviations corresponding to the thirdpixels in the plurality of pixel blocks.
 16. The terminal according toclaim 15, wherein the third pixels in the plurality of pixel blocks arein a one-to-one correspondence with available pixels in the known image,and the available pixels are pixels in the known image other than afourth pixel located at an image boundary.
 17. The terminal according toclaim 13, wherein the camera authentication system is configured to: seta similarity threshold based on a quantity of second target images and aquantity of the plurality of pixel blocks; calculate a similaritybetween the light sensitivity deviation of the first pixel in each pixelblock and the identification data; and compare the similarity with thesimilarity threshold to authenticate the target camera.
 18. The terminalaccording to claim 13, wherein the linear relationship model complieswith the following formula:${x_{a,b} = {{\underset{{({j,k})} \neq {({a,b})}}{\sum\limits_{{1 \leq j},{k \leq n}}}{c_{j,k}x_{j,k}}} + p}},$wherein x_(a,b) represents a predicted light intensity value of thefirst pixel in the pixel block, the first pixel is located in a row aand a column b in the pixel block, c_(j,k) represents a first constant,x_(j,k) represents a perceived light intensity value of a pixel in a rowj and a column k in the pixel block, and p represents a second constant.